def insert_sort(arr):
    for i in range(1, len(arr)):
        current_val = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > current_val:
            # print(f"arr[j] = {arr[j]}, current_val = {current_val}, j = {j}")
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = current_val

if __name__ == '__main__':
    arr = [5, 2, 4, 6, 1, 3]
    insert_sort(arr)
    print(arr)
